package com.hu.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//相当于    <bean id="user" class="com.hu.pojo.User"/>
@Component
public class User {
    @Value("hu") //为下面的属性赋值，优先级高
    public String name;

}
